#file:c:\Users\MI\Desktop\test\test1\src\components\Tabbar.vue
<template>
  <van-tabbar route>
    <van-tabbar-item to="/" icon="fire-o">资讯</van-tabbar-item>
    <van-tabbar-item to="/study" icon="passed">学习</van-tabbar-item>
    <van-tabbar-item to="/declare" icon="edit">申报</van-tabbar-item>
    <van-tabbar-item to="/mine" icon="contact-o">我的</van-tabbar-item>
  </van-tabbar>
</template>

<script setup>
import { ref } from 'vue';
import { useRouter } from 'vue-router';

const router = useRouter();
const active = ref(0);

const onChange = (index) => {
  console.log('Tab changed to:', index);
};
</script>

<style scoped>
/* 这里可以添加自定义样式 */
</style>